package com.huirui.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huirui.server.pojo.entity.CouponUser;
import com.huirui.server.pojo.vo.CouponVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author yujun
 * @description 针对表【t_coupon_user(用户优惠券领取记录表)】的数据库操作Mapper
 * @createDate 2025-10-28 22:32:43
 * @Entity com.huirui.server.pojo.entity.CouponUser
 */
public interface CouponUserMapper extends BaseMapper<CouponUser> {

    Long getUserUnusedCouponNumber(@Param("userId") Long userId);

    Long getUserUsedCouponNumber(@Param("userId") Long userId);

    Long getUserInvalidCouponNumber(@Param("userId") Long userId);

    List<CouponVo> listUserNormalCoupon(@Param("userId") Long userId);

    List<CouponVo> listUserUsedCoupon(@Param("userId") Long userId);

    List<CouponVo> listUserInvalidCoupon(@Param("userId") Long userId);

}




